/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package api.userinfo;

import Model.User.UserList;
import RssEasy.Core.Encrypt;
import RssEasy.Core.HttpRequestHelper;
import RssEasy.Core.ServletRequestHelper;
import RssEasy.Core.SignVerifyRequestHelper;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author zhangwenbo
 */
@WebServlet(name = "api_userinfo_change", urlPatterns = {"/api/userinfo/change"})
public class change extends ServletRequestHelper {
    @Override
    public HttpRequestHelper request(HttpServletRequest request, HttpServletResponse response) {
        super.request(request, response);
        try {
            UserList ul = new UserList(this.pageContext);
            ul.request();
            ul.keyvalue("mainbusiness", this.get("mainbusiness"));
            ul.update().where("myid=?", this.get("myid")).submit();
            out.print("1");
        } catch (Exception ex) {
            out.print("{\"rsscode\":101}");
        }
        return this;
    }

}
